{% extends "cashflow/base.html" %}

{% block content %}
<section id="accounts">
  <div class="page-header">
    <h1>Accounts</h1>
  </div>
  <a href="{% url account-add %}">New Account</a>
  
  <table class="data">
    <tr>
      <th>Name</th>
      <th>Description</th>
      <th>Balance</th>
      <th><i class="icon-wrench"></i></th>       
    </tr>
  {% for account in accounts %}
    <tr>
      <td><a href="{% url transaction-by-account account.id %}">{{ account.name }}</a></td>
      <td>{{ account.description }}</td>
      <td>{{ account.balance }}</td>
      <td>
          <a href="/cashflow/account/edit/{{ account.id }}/"><i class="icon-pencil"></i></a> 
          <a href="/cashflow/account/delete/{{ account.id }}/"><i class="icon-trash"></i></a>
      </td>
    </tr>
  {% endfor %}
  </table>
</section>


{% endblock %}